#include "SamplerNameGL3x.h"

using namespace Renderer;
using namespace Renderer::GL3x;


void Renderer::GL3x::SamplerNameGL3x::Destroy()
{
	if (_value != 0)
	{
		glDeleteSamplers(1, &_value);
		_value = 0;
	}
}

GLuint Renderer::GL3x::SamplerNameGL3x::GetValue() const
{
	return _value;
}

Renderer::GL3x::SamplerNameGL3x::~SamplerNameGL3x()
{
	Destroy();
}

Renderer::GL3x::SamplerNameGL3x::SamplerNameGL3x()
{
	glGenSamplers(1, &_value);
}
